﻿using System.Data;

namespace Demo4
{
    /// <summary>
    /// 委托
    /// </summary>
    public delegate int AddCallback(int a, int b);
    public class Class1
    {
        private int AddInt(int a, int b)
        {
            return a + b;
        }

        private static int AddIntS(int a, int b)
        {
            return a + b;
        }

        public static AddCallback InitStatic()
        {
            AddCallback addCallback = AddIntS;
            return addCallback;
        }
        
        public AddCallback Init()
        {
            AddCallback addCallback = AddInt;
            return AddInt;
        }
    }
}